home *** CD-ROM | disk | FTP | other *** search
- Path: news1.h1.usa.pipeline.com!usenet
- From: grantp@usa.pipeline.com(Pete)
- Newsgroups: comp.lang.c
- Subject: Re: Reading Directory entries
- Date: 1 Jan 1996 12:52:46 GMT
- Organization: Kalevi, Inc
- Message-ID: <4c8leu$5de@news1.usa.pipeline.com>
- NNTP-Posting-Host: pipe5.h1.usa.pipeline.com
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete)
- X-Newsreader: Pipeline USA v3.3.0
-
- On Jan 01, 1996 07:40:32 in article <Reading Directory entries>,
- '100243.2060@compuserve.com (PXH)' wrote:
-
-
- >Hi,
- >I am just starting out in the world of C programming so can someone
- >help me with this probably basic question -
- >
- >How do I read a directory, and determine whether the entries are files
- >or directories... I have used readdir, but this doesn't seem to
- >differentiate between the two. In short I'm trying to write a program
- >that "walks" a directory structure (under dos).
- >
-
- Directory (file system) processing is a function of the operating
- system, not of the C language. Furthermore, compiler vendors do
- not provide exactly the same library functions. Since you are working
- under DOS, look into:
- findfirst(), findnext()
- _findfirsr(), _findnext()
- _dos_findfirst(), _dos_findnext()
- pairs depending on the compiler you have. Borland's products
- use the first pair.
- --
-
- Pete
-
-
-
-
-
-